import { frontendPermissionList } from './constants'

/**
 * 后端权限转前端权限码
 */
export const handlePermissionToFrontend = backendPermissionList => {
  const permissionList = []
  frontendPermissionList.forEach(item => {
    if (backendPermissionList.includes(item.backendCode)) {
      permissionList.push(item.code)
    }
  })
  return permissionList
}
